package com.arcgis.demo;

import java.math.BigDecimal;

public class CircleTest {

	public static void main(String[] args) {
		double r = 5;
		
		int a = 0;
		while(a>=0&&a<=360){
			double x = 0;
			double y = 0;
			double radval = Math.toRadians(a);
			x = Math.cos(radval)*r;
			y = Math.sin(radval)*r;
			System.out.println("x="+x+"\ty="+y+"\tdegval="+radval+"\ta="+a);
			a++;
		}
		System.out.println();
		//System.out.println(Math.sin(Math.toRadians(45)));
		
	}
	
	public static void main2(String[] args) {
		BigDecimal a = new BigDecimal(-5);
		
		BigDecimal b = new BigDecimal(0);
		
		BigDecimal c = new BigDecimal(5);
		
		/*double a = -5;
		double b = 0;
		double c = 5;*/
		
		while(a.compareTo(BigDecimal.valueOf(-5))>=0 && a.compareTo(BigDecimal.valueOf(5))<=0){
			System.out.println(b.compareTo(c));
			/*b = Math.sqrt(c*c-a*a);
			System.out.println("a="+a+"\tb="+b);
			a = a+0.1;*/
		}

	}

}
